Optimal. Leaf size=244 \[ \frac {2 \left (5 a^3 A-15 a A b^2-15 a^2 b B-3 b^3 B\right ) \sqrt {\cos (c+d x)} E\left (\left .\frac {1}{2} (c+d x)\right |2\right ) \sqrt {\sec (c+d x)}}{5 d}+\frac {2 \left (9 a^2 A b+A b^3+3 a^3 B+3 a b^2 B\right ) \sqrt {\cos (c+d x)} F\left (\left .\frac {1}{2} (c+d x)\right |2\right ) \sqrt {\sec (c+d x)}}{3 d}+\frac {2 b \left (15 a A b+14 a^2 B+3 b^2 B\right ) \sqrt {\sec (c+d x)} \sin (c+d x)}{5 d}+\frac {2 b^2 (5 A b+9 a B) \sec ^{\frac {3}{2}}(c+d x) \sin (c+d x)}{15 d}+\frac {2 b B \sqrt {\sec (c+d x)} (a+b \sec (c+d x))^2 \sin (c+d x)}{5 d} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.31, antiderivative size = 244, normalized size of antiderivative = 1.00, number of steps
used = 8, number of rules used = 7, integrand size = 33, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.212, Rules used = {4111, 4161,
4132, 3856, 2720, 4131, 2719} \begin {gather*} \frac {2 b \left (14 a^2 B+15 a A b+3 b^2 B\right ) \sin (c+d x) \sqrt {\sec (c+d x)}}{5 d}+\frac {2 \left (3 a^3 B+9 a^2 A b+3 a b^2 B+A b^3\right ) \sqrt {\cos (c+d x)} \sqrt {\sec (c+d x)} F\left (\left .\frac {1}{2} (c+d x)\right |2\right )}{3 d}+\frac {2 \left (5 a^3 A-15 a^2 b B-15 a A b^2-3 b^3 B\right ) \sqrt {\cos (c+d x)} \sqrt {\sec (c+d x)} E\left (\left .\frac {1}{2} (c+d x)\right |2\right )}{5 d}+\frac {2 b^2 (9 a B+5 A b) \sin (c+d x) \sec ^{\frac {3}{2}}(c+d x)}{15 d}+\frac {2 b B \sin (c+d x) \sqrt {\sec (c+d x)} (a+b \sec (c+d x))^2}{5 d} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 2719
Rule 2720
Rule 3856
Rule 4111
Rule 4131
Rule 4132
Rule 4161
Rubi steps
\begin {align*} \int \frac {(a+b \sec (c+d x))^3 (A+B \sec (c+d x))}{\sqrt {\sec (c+d x)}} \, dx &=\frac {2 b B \sqrt {\sec (c+d x)} (a+b \sec (c+d x))^2 \sin (c+d x)}{5 d}+\frac {2}{5} \int \frac {(a+b \sec (c+d x)) \left (\frac {1}{2} a (5 a A-b B)+\frac {1}{2} \left (3 b^2 B+5 a (2 A b+a B)\right ) \sec (c+d x)+\frac {1}{2} b (5 A b+9 a B) \sec ^2(c+d x)\right )}{\sqrt {\sec (c+d x)}} \, dx\\ &=\frac {2 b^2 (5 A b+9 a B) \sec ^{\frac {3}{2}}(c+d x) \sin (c+d x)}{15 d}+\frac {2 b B \sqrt {\sec (c+d x)} (a+b \sec (c+d x))^2 \sin (c+d x)}{5 d}+\frac {4}{15} \int \frac {\frac {3}{4} a^2 (5 a A-b B)+\frac {5}{4} \left (9 a^2 A b+A b^3+3 a^3 B+3 a b^2 B\right ) \sec (c+d x)+\frac {3}{4} b \left (15 a A b+14 a^2 B+3 b^2 B\right ) \sec ^2(c+d x)}{\sqrt {\sec (c+d x)}} \, dx\\ &=\frac {2 b^2 (5 A b+9 a B) \sec ^{\frac {3}{2}}(c+d x) \sin (c+d x)}{15 d}+\frac {2 b B \sqrt {\sec (c+d x)} (a+b \sec (c+d x))^2 \sin (c+d x)}{5 d}+\frac {4}{15} \int \frac {\frac {3}{4} a^2 (5 a A-b B)+\frac {3}{4} b \left (15 a A b+14 a^2 B+3 b^2 B\right ) \sec ^2(c+d x)}{\sqrt {\sec (c+d x)}} \, dx+\frac {1}{3} \left (9 a^2 A b+A b^3+3 a^3 B+3 a b^2 B\right ) \int \sqrt {\sec (c+d x)} \, dx\\ &=\frac {2 b \left (15 a A b+14 a^2 B+3 b^2 B\right ) \sqrt {\sec (c+d x)} \sin (c+d x)}{5 d}+\frac {2 b^2 (5 A b+9 a B) \sec ^{\frac {3}{2}}(c+d x) \sin (c+d x)}{15 d}+\frac {2 b B \sqrt {\sec (c+d x)} (a+b \sec (c+d x))^2 \sin (c+d x)}{5 d}+\frac {1}{5} \left (5 a^3 A-15 a A b^2-15 a^2 b B-3 b^3 B\right ) \int \frac {1}{\sqrt {\sec (c+d x)}} \, dx+\frac {1}{3} \left (\left (9 a^2 A b+A b^3+3 a^3 B+3 a b^2 B\right ) \sqrt {\cos (c+d x)} \sqrt {\sec (c+d x)}\right ) \int \frac {1}{\sqrt {\cos (c+d x)}} \, dx\\ &=\frac {2 \left (9 a^2 A b+A b^3+3 a^3 B+3 a b^2 B\right ) \sqrt {\cos (c+d x)} F\left (\left .\frac {1}{2} (c+d x)\right |2\right ) \sqrt {\sec (c+d x)}}{3 d}+\frac {2 b \left (15 a A b+14 a^2 B+3 b^2 B\right ) \sqrt {\sec (c+d x)} \sin (c+d x)}{5 d}+\frac {2 b^2 (5 A b+9 a B) \sec ^{\frac {3}{2}}(c+d x) \sin (c+d x)}{15 d}+\frac {2 b B \sqrt {\sec (c+d x)} (a+b \sec (c+d x))^2 \sin (c+d x)}{5 d}+\frac {1}{5} \left (\left (5 a^3 A-15 a A b^2-15 a^2 b B-3 b^3 B\right ) \sqrt {\cos (c+d x)} \sqrt {\sec (c+d x)}\right ) \int \sqrt {\cos (c+d x)} \, dx\\ &=\frac {2 \left (5 a^3 A-15 a A b^2-15 a^2 b B-3 b^3 B\right ) \sqrt {\cos (c+d x)} E\left (\left .\frac {1}{2} (c+d x)\right |2\right ) \sqrt {\sec (c+d x)}}{5 d}+\frac {2 \left (9 a^2 A b+A b^3+3 a^3 B+3 a b^2 B\right ) \sqrt {\cos (c+d x)} F\left (\left .\frac {1}{2} (c+d x)\right |2\right ) \sqrt {\sec (c+d x)}}{3 d}+\frac {2 b \left (15 a A b+14 a^2 B+3 b^2 B\right ) \sqrt {\sec (c+d x)} \sin (c+d x)}{5 d}+\frac {2 b^2 (5 A b+9 a B) \sec ^{\frac {3}{2}}(c+d x) \sin (c+d x)}{15 d}+\frac {2 b B \sqrt {\sec (c+d x)} (a+b \sec (c+d x))^2 \sin (c+d x)}{5 d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 2.46, size = 190, normalized size = 0.78 \begin {gather*} \frac {\sec ^{\frac {5}{2}}(c+d x) \left (12 \left (5 a^3 A-15 a A b^2-15 a^2 b B-3 b^3 B\right ) \cos ^{\frac {5}{2}}(c+d x) E\left (\left .\frac {1}{2} (c+d x)\right |2\right )+20 \left (9 a^2 A b+A b^3+3 a^3 B+3 a b^2 B\right ) \cos ^{\frac {5}{2}}(c+d x) F\left (\left .\frac {1}{2} (c+d x)\right |2\right )+2 b \left (15 \left (3 a A b+3 a^2 B+b^2 B\right )+10 b (A b+3 a B) \cos (c+d x)+9 \left (5 a A b+5 a^2 B+b^2 B\right ) \cos (2 (c+d x))\right ) \sin (c+d x)\right )}{30 d} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] Leaf count of result is larger than twice the leaf count of optimal. \(969\) vs.
\(2(272)=544\).
time = 5.30, size = 970, normalized size = 3.98
method | result | size |
default | \(\text {Expression too large to display}\) | \(970\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [C] Result contains higher order function than in optimal. Order 9 vs. order
4.
time = 0.93, size = 326, normalized size = 1.34 \begin {gather*} -\frac {5 \, \sqrt {2} {\left (3 i \, B a^{3} + 9 i \, A a^{2} b + 3 i \, B a b^{2} + i \, A b^{3}\right )} \cos \left (d x + c\right )^{2} {\rm weierstrassPInverse}\left (-4, 0, \cos \left (d x + c\right ) + i \, \sin \left (d x + c\right )\right ) + 5 \, \sqrt {2} {\left (-3 i \, B a^{3} - 9 i \, A a^{2} b - 3 i \, B a b^{2} - i \, A b^{3}\right )} \cos \left (d x + c\right )^{2} {\rm weierstrassPInverse}\left (-4, 0, \cos \left (d x + c\right ) - i \, \sin \left (d x + c\right )\right ) + 3 \, \sqrt {2} {\left (-5 i \, A a^{3} + 15 i \, B a^{2} b + 15 i \, A a b^{2} + 3 i \, B b^{3}\right )} \cos \left (d x + c\right )^{2} {\rm weierstrassZeta}\left (-4, 0, {\rm weierstrassPInverse}\left (-4, 0, \cos \left (d x + c\right ) + i \, \sin \left (d x + c\right )\right )\right ) + 3 \, \sqrt {2} {\left (5 i \, A a^{3} - 15 i \, B a^{2} b - 15 i \, A a b^{2} - 3 i \, B b^{3}\right )} \cos \left (d x + c\right )^{2} {\rm weierstrassZeta}\left (-4, 0, {\rm weierstrassPInverse}\left (-4, 0, \cos \left (d x + c\right ) - i \, \sin \left (d x + c\right )\right )\right ) - \frac {2 \, {\left (3 \, B b^{3} + 9 \, {\left (5 \, B a^{2} b + 5 \, A a b^{2} + B b^{3}\right )} \cos \left (d x + c\right )^{2} + 5 \, {\left (3 \, B a b^{2} + A b^{3}\right )} \cos \left (d x + c\right )\right )} \sin \left (d x + c\right )}{\sqrt {\cos \left (d x + c\right )}}}{15 \, d \cos \left (d x + c\right )^{2}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-2)]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Exception raised: SystemError} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.00 \begin {gather*} \int \frac {\left (A+\frac {B}{\cos \left (c+d\,x\right )}\right )\,{\left (a+\frac {b}{\cos \left (c+d\,x\right )}\right )}^3}{\sqrt {\frac {1}{\cos \left (c+d\,x\right )}}} \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________